use day12::solution::*;
use day12::solution::RecordKind::{Damaged, Unknown, Operational};

#[test]
fn test_str_to_data() {
    let data: Data = "#.#.### 1,1,3".into();
    assert_eq!(
        data,
        Data::new(
            vec![Damaged, Operational, Damaged, Operational, Damaged, Damaged, Damaged],
            vec![1, 1, 3],
            vec![],
        )
    );

    let data: Data = "???.### 1,1,3".into();
    assert_eq!(
        data,
        Data::new(
            vec![Unknown, Unknown, Unknown, Operational, Damaged, Damaged, Damaged],
            vec![1, 1, 3],
            vec![0, 1, 2],
        )
    );
}